package com.lcxw.hxzb.friendcircle.project.system.service.impl;

import com.lcxw.hxzb.friendcircle.common.utils.DateUtils;
import com.lcxw.hxzb.friendcircle.project.system.domain.YwpdGamelevel;
import com.lcxw.hxzb.friendcircle.project.system.mapper.YwpdGamelevelMapper;
import com.lcxw.hxzb.friendcircle.project.system.service.IYwpdGamelevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 陪玩游戏等级Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-15
 */
@Service
public class YwpdGamelevelServiceImpl implements IYwpdGamelevelService
{
    @Autowired
    private YwpdGamelevelMapper ywpdGamelevelMapper;

    /**
     * 查询陪玩游戏等级
     * 
     * @param levelId 陪玩游戏等级ID
     * @return 陪玩游戏等级
     */
    @Override
    public YwpdGamelevel selectYwpdGamelevelById(Long levelId)
    {
        return ywpdGamelevelMapper.selectYwpdGamelevelById(levelId);
    }

    /**
     * 查询陪玩游戏等级列表
     * 
     * @param ywpdGamelevel 陪玩游戏等级
     * @return 陪玩游戏等级
     */
    @Override
    public List<YwpdGamelevel> selectYwpdGamelevelList(YwpdGamelevel ywpdGamelevel)
    {
        return ywpdGamelevelMapper.selectYwpdGamelevelList(ywpdGamelevel);
    }

    /**
     * 新增陪玩游戏等级
     * 
     * @param ywpdGamelevel 陪玩游戏等级
     * @return 结果
     */
    @Override
    public int insertYwpdGamelevel(YwpdGamelevel ywpdGamelevel)
    {
        ywpdGamelevel.setCreateTime(DateUtils.getNowDate());
        return ywpdGamelevelMapper.insertYwpdGamelevel(ywpdGamelevel);
    }

    /**
     * 修改陪玩游戏等级
     * 
     * @param ywpdGamelevel 陪玩游戏等级
     * @return 结果
     */
    @Override
    public int updateYwpdGamelevel(YwpdGamelevel ywpdGamelevel)
    {
        return ywpdGamelevelMapper.updateYwpdGamelevel(ywpdGamelevel);
    }

    /**
     * 批量删除陪玩游戏等级
     * 
     * @param levelIds 需要删除的陪玩游戏等级ID
     * @return 结果
     */
    @Override
    public int deleteYwpdGamelevelByIds(Long[] levelIds)
    {
        return ywpdGamelevelMapper.deleteYwpdGamelevelByIds(levelIds);
    }

    /**
     * 删除陪玩游戏等级信息
     * 
     * @param levelId 陪玩游戏等级ID
     * @return 结果
     */
    @Override
    public int deleteYwpdGamelevelById(Long levelId)
    {
        return ywpdGamelevelMapper.deleteYwpdGamelevelById(levelId);
    }
}
